<template>
  <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
    <el-tab-pane label="未签约" name="first">
      <dqyList ref="dqyList" />
    </el-tab-pane>
    <el-tab-pane label="已分配" name="second">
      <yfpList ref="yfpList" />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import dqyList from './dqyList'
import yfpList from './yfpList'
export default {
  components: { dqyList, yfpList },
  data() {
    return {
      activeName: 'first'
    }
  },
  methods: {
    tabOpen() {

    },
    handleClick(tab, event) {
      const name = tab.name
      if (name === 'first') {
        console.log('------------------' + name)
        this.$refs.dqyList.crud.toQuery()
      } else if (name === 'second') {
        console.log('------------------' + name)
        this.$refs.yfpList.crud.toQuery()
      }
    }
  }
}
</script>

<style scoped>

</style>
